using ChatBackend.DTOs;

namespace ChatBackend.Services
{
    public interface IChatService
    {
        Task<ChatRoomDto> CreateChatRoomAsync(int userId, CreateChatRoomDto createChatRoomDto);
        Task<ChatRoomDto?> GetChatRoomAsync(int chatRoomId, int userId);
        Task<List<ChatRoomDto>> GetUserChatRoomsAsync(int userId);
        Task<ChatRoomDto?> GetOrCreateDirectChatAsync(int user1Id, int user2Id);
        Task<MessageDto> SendMessageAsync(int userId, SendMessageDto sendMessageDto);
        Task<ChatHistoryDto> GetChatHistoryAsync(int chatRoomId, int userId, int pageNumber = 1, int pageSize = 50);
        Task<bool> JoinChatRoomAsync(int chatRoomId, int userId);
        Task<bool> LeaveChatRoomAsync(int chatRoomId, int userId);
        Task<bool> MarkAsReadAsync(int chatRoomId, int userId);
        Task<List<UserDto>> GetChatRoomMembersAsync(int chatRoomId, int userId);
        Task<bool> DeleteMessageAsync(int messageId, int userId);
        Task<MessageDto?> EditMessageAsync(int messageId, int userId, string newContent);
    }
}
